package BuilderPattern;

import BuilderPattern.food.burg.ChickenBurger;
import BuilderPattern.food.drink.Coke;
import BuilderPattern.food.drink.Pepsi;
import BuilderPattern.food.burg.VegBurger;

/**
 * @Author: zhaojie
 * @Date: Created in 11:48 2018/6/26
 * @Description: 创建一个 MealBuilder 类，实际的 builder 类负责创建 Meal 对象。
 */
public class MealBuilder {

    public Meal prepareVegMeal (){
        Meal meal = new Meal();
        meal.addItem(new VegBurger());
        meal.addItem(new Coke());
        return meal;
    }

    public Meal prepareNonVegMeal (){
        Meal meal = new Meal();
        meal.addItem(new ChickenBurger());
        meal.addItem(new Pepsi());
        return meal;
    }
}
